package com.qf.day06;

public class Animal {
    private String type;
    private int age ;
    private String sex;

    public Animal(String type, int age, String sex) {
        this.type = type;
        this.age = age;
        this.sex = sex;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }
    @Override
    public String toString() {
        return "Fish{" +
                "type='" + type + '\'' +
                ", age=" + age +
                ", sex='" + sex + '\'' +
                '}';
    }
    public void eat(){
        System.out.println("又吃上了");
    }
    public void sleep(){
        System.out.println("ZZZzzz");
    }
}
